School of Veterinary Science, University of Queensland
2023-11-20
This introduction to spatial visualisation assumes that you are familiar with R and Rstudio.
This session will have a very brief introduction and most of the session will be for you to practice.
I am a Veterinarian working in epidemiology - R is my favorite software and I will try to convince you that it is worth the effort.
If you have any questions, please don’t hesitate to ask. We are all here to learn.
RBecause R is free
Repeatable - It is easy to repeat analysis
Sharing - it is easy to share the code with collaborators
Working with teams - It is possible to work on the same analysis/project with multiple collaborators.
Internet is full of tutorials and helps on how to conduct analysis in R
All the information for this session is on GitHub
I designed the tutorial so you can download most of the data using a package or from open sources.
The sf package (Pebesma, E., 2022) stands for Simple Features.
This package replaces sp and allows us to treat spatial objects like shape file objects as regular data frames!
Fast reading and writing of data objects
Enhanced plotting performance
sf objects can be treated as data frames in most operations
sf functions can be combined using %>% operator
Simple Features classes
Simple Features: Cheat Sheet
sf and mapviewThis map is an example of the maps we can create with R
example from Paula Moraga, 2023
terra package (Hijmans 2023) replaces the raster package.
It is faster, simple and can do more
terrahttps://bookdown.org/robinlovelace/geocompr/ https://github.com/rstudio/cheatsheets/blob/main/sf.pdf https://www.paulamoraga.com/book-spatial/types-of-spatial-data.html